#include "CTexture.h"

class CSprite

{
public:
	CSprite(LPDIRECT3DDEVICE9 dev,char *filename,int x, int y, int width, int height, int lastframe, int animdelay);
	~CSprite();
	int createSprite(LPDIRECT3DDEVICE9 dev);
	void move(int,int);
	void checkOutScreen();
	void animate();
	void draw();
	bool collide(CSprite *sprite2);

	int getX() { return x; }
	int getY() { return y; }
	int getWidth() { return width; }
	int getHeight() { return height; }

private:
	CTexture *image;
	LPD3DXSPRITE sprite_handler;
	int x,y;
    int width,height;
    //int movex,movey;
    int curframe,lastframe;
    int animdelay,animcount;
    int scalex,scaley;
    int rotation,rotaterate;
};
